<template>
    <van-row type="flex" justify="space-around">
        <van-col 
            span="8" 
            :style="fmtBorder(img.border)" 
            v-for="(img, i) in tempEngine.imgs"
            :key="i"
            >
            <upload :img="img" :boxClass="boxClass"></upload>
        </van-col>
    </van-row>
</template>
<script>
import upload from '@/components/upload'
import { mapGetters } from 'vuex'
export default {
    components: { upload },
    data() {
        return {
            boxClass: {
                div: {padding: '45px'},
                icon: {'font-size': '25px', color: '#C0C4CC'}
            }
        }
    },
    computed: {
        ...mapGetters(['backGround'])
    },
    props: {
        tempEngine: {
            type: Object,
            default(){}
        }
    },
    methods: {
        fmtBorder(val){
            val['border-left'] = this.backGround
            val['border-right'] = this.backGround
            return val
        }
    }
}
</script>

